package pers.zc.activiti.shejimoshi.zhuangtai.node;

import pers.zc.activiti.shejimoshi.zhuangtai.type.Type;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Annotion:
 * @ClassName: Node
 * @Author: Lin Fuyuan
 * @Date: 2019/11/18  9:14
 * @Version: 1.0
 */
public abstract class Node {
    private String status;
    private String date;

    public String getType() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public String getDate() {
        return date;
    }

    public void setDate(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        this.date = sdf.format(date);
    }


    //
    private Type type;

    public void setType(Type type) {
        this.type = type;
    }

    public  void run(){
        type.run(this);
    }
}
